package cn.ekuma.epos.datalogic.define.recommend;

import java.util.List;

import net.xeoh.plugins.base.annotations.PluginImplementation;

import com.openbravo.data.basic.BasicException;
import com.openbravo.data.loader.I_Session;
import com.openbravo.pos.bean.ProductExt;

import cn.ekuma.data.dao.I_DataLogic;
import cn.ekuma.epos.datalogic.I_ProductRecommend;
import cn.ekuma.epos.datalogic.define.dao.ProductExtDAO;

@PluginImplementation
public class BaseProductRecommend implements I_ProductRecommend{

	I_DataLogic dataLogic;
	I_Session s;
	ProductExtDAO productExtDAO;
	@Override
	public void init(I_DataLogic dataLogic) {
		this.dataLogic=dataLogic;
		productExtDAO=(ProductExtDAO) dataLogic.getDao(ProductExt.class);
	}

	@Override
	public void init(I_Session s) {
		this.s=s;	
	}

	@Override
	public List<ProductExt> getRecommendProducts(String productId)
			throws BasicException {
		return productExtDAO.getBomProductForIncludeListById(productId);
	}

}
